"""
__author__ = '霍格沃兹测试开发学社'
__desc__ = '更多测试开发技术探讨，请访问：https://ceshiren.com/t/topic/15860'
"""
from typing import List

import requests

def pytest_collection_modifyitems(
    session: "Session", config: "Config", items: List["Item"]
) -> None:
    for item in items:
        item.name = item.name.encode('utf-8').decode('unicode-escape')
        item._nodeid = item.nodeid.encode('utf-8').decode('unicode-escape')
        print(f"nodeid = {item.nodeid}")
        print(f"path = {item.fspath.strpath}")

        # requests.post("http://localhost:5000/testcase",
        # json={"nodeid": item.nodeid, "description": item.fspath.strpath})